<%-- 
    Document   : EditEnquiry
    Created on : Mar 13, 2014, 10:49:32 AM
    Author     : mishra
--%>

<%@page import="Category.CategoryBean"%>
<%@page import="Course.CourseBean"%>
<%@page import="java.util.Iterator"%>
<%@page import="java.util.Vector"%>
<%@page import="FeeType.FeeTypeBean"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
    try {
        if (session.getAttribute("uid") != null) {
            if (session.getAttribute("Manage_Enquiry").toString().equals("1")) {
%>

<!DOCTYPE html>
<html>
    <head>
        <title>Ramgovind Automated System</title>

        <link rel="stylesheet" href="/RIT/css/bootstrap.css">
        <link rel="stylesheet" href="/RIT/css/bootstrap-responsive.css">
        <link rel="stylesheet" href="/RIT/css/jquery.fancybox.css">
        <link rel="stylesheet" href="/RIT/css/style.css">
        <link rel="stylesheet" href="/RIT/css/iconfont.css">
        <link rel="stylesheet" href="/RIT/css/bootstrap.datepicker.css">
        <script src="../../ajax/ajax.js"></script>
        <script>
            function cha(){
                 $("[value|='***']").val('');
            }
        </script>
        <script>
            function streamName(trg,val){
                document.getElementById(trg).value=val;
            }
        </script>

    </head>
    <body onload="cha()">
        <%@include file="/topheader.html" %>
        <%@include file="/servicesheader.html" %>
        <div class="main">
            <div class="container-fluid">
                <%@include file="/Services/Enquiry/enqsidenav.jsp" %>
                <div class="content">
                   
                    <div class="row-fluid">
                        <div class="span12">
                            <div class="box">
                                <div class="box-head">
                                    <h3>Submit Enquiry</h3>
                                    <a href="Enquiry.jsp">
                                        <button style="float: right" class="btn btn-success">View Enquiry</button>
                                    </a>
                                </div>
                                <form action="/RIT/EditEnquiry" method="post" class='validate form-horizontal'>
                                    <div class="box-content">
                                        <!---Form Start....-->
                                        <legend>
                                            Student Details
                                        </legend>
                                        <div id="lside" style="float: left; margin-top: 10px;width: 48%;">
                                            <div class="control-group">
                                                <label for="sname" class="control-label">Student Name<span style="color:red">*</span></label>
                                                <div class="controls">
                                                    <input type="text" name="sname" id="sname" class='required' value="<%=request.getParameter("sname")%>">
                                                    <input type="hidden" name="enqid" id="enqid" value="<%=request.getParameter("eid")%>">
                                                </div>
                                            </div>
                                            <div class="control-group">
                                                <label for="Dob" class="control-label">Date of Birth<span style="color:red">*</span></label>
                                                <div class="controls">
                                                    <div class="input-append">
                                                        <input type="text" name="dob" class='datepick required' id="dob" readonly value="<%=request.getParameter("dob")%>">
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="control-group">
                                                <label for="dor" class="control-label">Date of Registration<span style="color:red">*</span></label>
                                                <div class="controls">
                                                    <div class="input-append">
                                                        <input type="text" name="dor" class='datepick required' id="dor" readonly value="<%=request.getParameter("dor")%>">
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="control-group">
                                                <label for="gender" class="control-label">Gender<span style="color:red">*</span></label>
                                                <div class="controls">
                                                    <select name="gender" id="gender" class='{required:true}'>
                                                        <option value="<%=request.getParameter("gender")%>"><%if(request.getParameter("gender").equals("1")){%>Male<%}else{%>Female<%}%></option>
                                                        <option value=''>Choose one</option>
                                                        <option value='1'>Male</option>
                                                        <option value='2'>Female</option>
                                                    </select>
                                                </div>
                                            </div>
                                                        <div class="control-group">
                                                <label for="categoryid" class="control-label">Category<span style="color:red">*</span></label>
                                                <div class="controls">
                                                    <select name="categoryid" id="categoryid">
                                                        <option value="<%=request.getParameter("catid")%>"><%=request.getParameter("catename")%></option>
                                                        <%{
                                                            Vector<Object> list=Category.Query.viewAll();
                                                            Iterator it=list.iterator();
                                                            while(it.hasNext()){
                                                           CategoryBean cb=(CategoryBean) it.next();     
                                                        %>
                                                        <option value="<%=cb.getCategoryId()%>"><%=cb.getCategory()%></option>
                                                        <%}}%>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="control-group">
                                                <label for="fname" class="control-label">Father Name<span style="color:red">*</span></label>
                                                <div class="controls">
                                                    <input type="text" name="fname" id="fname" class='required' value="<%=request.getParameter("fname")%>">
                                                </div>
                                            </div>
                                        </div>
                                        <div id="rside" style="float: left; margin-right: 10px; margin-top: 10px">
                                            <div class="control-group">
                                                <label for="mno" class="control-label">Mobile No.<span style="color:red">*</span></label>
                                                <div class="controls">
                                                    <input type="text" name="mno" id="mno" class='required number' value="<%=request.getParameter("fmobile")%>">
                                                </div>
                                            </div>
                                            <div class="control-group">
                                                <label for="email" class="control-label">Email<span style="color:red">*</span></label>
                                                <div class="controls">
                                                    <div class="input-append">
                                                        <input type="text" name="email" id="email" value="<%=request.getParameter("email")%>" style="width: 181px;" class='{required:true} email'><span class="add-on"><i class="ficon-mail3"></i></span>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="control-group">
                                                <label for="course" class="control-label">Course<span style="color:red">*</span></label>
                                                <div class="controls">
                                                    <select name="course" id="course" class='{required:true}'onchange="getStream('stream',this.value),getCoursePeriod(this.value,'subYear')">
                                                        
                                                        <option value="<%=request.getParameter("courseid")%>"><%=request.getParameter("coursename")%></option>
                                                        <%{
                                                                Vector<Object> list = new Vector<Object>();
                                                                list = Course.Query.viewAlldistinct();
                                                                CourseBean ctb = new CourseBean();
                                                                if (!list.isEmpty()) {
                                                                    Iterator it = list.iterator();
                                                                    while (it.hasNext()) {
                                                                        ctb = (CourseBean) it.next();
                                                        %>
                                                        <option value='<%=ctb.getCourseName()%>'><%=ctb.getCourseName()%></option>
                                                        <%}
                                                            }
                                                        %>
                                                        <%}%>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="control-group">
                                                <label for="stream" class="control-label">Stream<span style="color:red">*</span></label>
                                                <div class="controls">
                                                    <select name="stream" id="stream" class='{required:true}' onclick="streamName('streamname', this.options[this.selectedIndex].text)">
                                                        <option value="<%=request.getParameter("courseid")%>"><%=request.getParameter("stream")%></option>
                                                    </select>
                                                        <input type="hidden" id="streamname" name="streamname" value="<%=request.getParameter("stream")%>">
                                                </div>
                                            </div>
                                            <div class="control-group">
                                                <label for="prospectus" class="control-label">Prospectus<span style="color:red">*</span></label>
                                                <div class="controls">
                                                    <input type="radio" name="pros1" id="pros1" value="1" <%if(request.getParameter("prospe").equals("1")){%> checked<%}%>>&nbsp;&nbsp;&nbsp;Issued&nbsp;&nbsp;&nbsp;
                                                    <input type="radio" name="pros1" id="pros2" value="2" <%if(request.getParameter("prospe").equals("2")){%> checked<%}%>>&nbsp;&nbsp;&nbsp;Not Issued
                                                </div>
                                            </div>
                                        </div>
                                        <legend>
                                            Academic Details
                                        </legend>
                                        <div class="box-content">
                                            <!---Form Start....-->
                                            <div id="lside" style="float: left; margin-top: 30px;width: 48%;">
                                                <div class="control-group">
                                                    <label for="exname" class="control-label">Entrance Exam Name<span style="color:red">*</span></label>
                                                    <div class="controls">
                                                        <input type="text" name="exname" id="exname" value="<%=request.getParameter("enexamname")%>" class="required">
                                                    </div>
                                                </div>
                                                <div class="control-group">
                                                    <label for="exmark" class="control-label">Entrance Exam Marks<span style="color:red">*</span></label>
                                                    <div class="controls">
                                                        <input type="text" name="exmark" id="exmark" value="<%=request.getParameter("exmark")%>" class="required number">
                                                    </div>
                                                </div>
                                                <div class="control-group">
                                                    <label for="exrank" class="control-label">Rank<span style="color:red">*</span></label>
                                                    <div class="controls">
                                                        <input type="text" name="exrank" id="exrank" value="<%=request.getParameter("exrank")%>" class="required number">
                                                    </div>
                                                </div>
                                            </div>
                                            <div id="rside" style="float: left; margin-right: 10px; margin-top: 30px">
                                                <div class="control-group">
                                                    <label for="oexname" class="control-label">Other Exam Name</label>
                                                    <div class="controls">
                                                        <input type="text" name="oexname" id="oexname" value="<%=request.getParameter("oentexname")%>">
                                                    </div>
                                                </div>
                                                <div class="control-group">
                                                    <label for="oexmark" class="control-label">Marks</label>
                                                    <div class="controls">
                                                        <input type="text" name="oexmark" id="oexmark" value="<%=request.getParameter("oexmark")%>">
                                                    </div>
                                                </div>
                                                <div class="control-group">
                                                    <label for="oexrank" class="control-label">Rank</label>
                                                    <div class="controls">
                                                        <input type="text" name="oexrank" id="oexrank" value="<%=request.getParameter("oexrank")%>">
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <!---Form Ends....-->
                                    </div>
                                    <div class="form-actions">
                                        <input type="submit" class='btn btn-primary'>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>

                </div>	
            </div>
        </div>

        <script src="/RIT/js/jquery.js"></script>
        <script src="/RIT/js/less.js"></script>
        <script src="/RIT/js/bootstrap.min.js"></script>
        <script src="/RIT/js/jquery.uniform.min.js"></script>
        <script src="/RIT/js/bootstrap.timepicker.js"></script>
        <script src="/RIT/js/bootstrap.datepicker.js"></script>
        <script src="/RIT/js/chosen.jquery.min.js"></script>
        <script src="/RIT/js/jquery.fancybox.js"></script>
        <script src="/RIT/js/plupload/plupload.full.js"></script>
        <script src="/RIT/js/plupload/jquery.plupload.queue/jquery.plupload.queue.js"></script>
        <script src="/RIT/js/jquery.cleditor.min.js"></script>
        <script src="/RIT/js/jquery.inputmask.min.js"></script>
        <script src="/RIT/js/jquery.tagsinput.min.js"></script>
        <script src="/RIT/js/jquery.mousewheel.js"></script>
        <script src="/RIT/js/jquery.textareaCounter.plugin.js"></script>
        <script src="/RIT/js/ui.spinner.js"></script>
        <script src="/RIT/js/jquery.jgrowl_minimized.js"></script>
        <script src="/RIT/js/jquery.form.js"></script>
        <script src="/RIT/js/jquery.validate.min.js"></script>
        <script src="/RIT/js/bbq.js"></script>
        <script src="/RIT/js/jquery-ui-1.8.22.custom.min.js"></script>
        <script src="/RIT/js/jquery.form.wizard-min.js"></script>
        <script src="/RIT/js/jquery.cookie.js"></script>
        <script src="/RIT/js/jquery.metadata.js"></script>
        <script src="/RIT/js/custom.js"></script><script src="/RIT/js/demo.js"></script>
        <script src="/RIT/js/iconfont.js"></script>
    </body>
</html>

<%} else {
%>
<script type="text/javascript">
    alert("You Are Not Authorised");
    window.history.back();
</script>
<%             }
        } else {
            request.setAttribute("msg", "You Are Not Authorised! Please Contact to System Administrator!");
            request.setAttribute("value", "0");
            getServletContext().getRequestDispatcher("/index.jsp").forward(request, response);
        }
    } catch (Exception e) {
        request.setAttribute("msg", "Please Contact to System Administrator!");
        request.setAttribute("value", "0");
        getServletContext().getRequestDispatcher("/index.jsp").forward(request, response);
    }
%>

